package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.SysCompeScoringSettingDetail;
import com.ruoyi.system.mapper.SysCompeScoringSettingDetailMapper;
import com.ruoyi.system.service.SysCompeScoringSettingDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author 柳
 * @Date 2021/3/4
 * @Description TODO
 */
@Service
public class SysCompeScoringSettingDetailServiceImpl implements SysCompeScoringSettingDetailService {


    @Autowired
    private SysCompeScoringSettingDetailMapper compeScoringSettingDetailMapper;


    /**
     * 根据赛事id删除评分项信息
     * @param epid
     */
    @Override
    public void deleteCompeScoringSettingDetailByEpid(Integer epid) {
        compeScoringSettingDetailMapper.deleteCompeScoringSettingDetailByEpid(epid);
    }

    /**
     * 大赛评分项设置(添加评分项)
     * @param compeScoringSettingDetail
     */
    @Override
    public void saveCompeScoringSettingDetail(SysCompeScoringSettingDetail compeScoringSettingDetail) {
        compeScoringSettingDetailMapper.saveCompeScoringSettingDetail(compeScoringSettingDetail);
    }

    /**
     * 根据大赛id查询评分项
     * @param epid
     * @return
     */
    @Override
    public List<SysCompeScoringSettingDetail> queryCompeScoringSettingDetail(Integer epid) {
        return compeScoringSettingDetailMapper.queryCompeScoringSettingDetail(epid);
    }
}
